{  Statement: http://acmp.ru/?main=task&id_task=22
   Verdict: Accepted
}
uses
    SysUtils, Math;

var
    n,ans:int64;

begin
reset(input,'input.txt');
rewrite(output,'output.txt');
read(n);
ans := 0;
while n > 0 do begin
    if odd(n) then inc(ans);
    n := n shr 1;
end;
write(ans);
end.